# Contributor: Frank Crawford <frank@crawford.emu.id.au>
# Maintainer: Bohdan <chbgdn@gmail.com>
pkgname=it87-src
_modname=it87
pkgver=1_p20240609
_gitrev=a82899557b4779b87d444a43caf126615e03bb4a
pkgrel=0
pkgdesc="Driver for IT86xx/IT87xx Super I/O chips (sources)"
url="https://github.com/frankcrawford/it87"
arch="noarch"
license="GPL-2.0-or-later"
source="https://github.com/frankcrawford/it87/archive/$_gitrev/$_modname-$_gitrev.tar.gz"
builddir="$srcdir/it87-$_gitrev"
options="!check"  # just sources

prepare() {
	default_prepare

	cat >AKMBUILD <<-EOF
	modname=$_modname
	modver=$pkgver
	built_modules='it87.ko'
	EOF
}

package() {
	install -D -m644 -t "$pkgdir"/usr/src/$_modname-$pkgver \
		./*.c ./*.h Makefile AKMBUILD
}

sha512sums="
5a3257d0a6ba8a858719c3932a0926e9df68c6bccfb3896ffa6fd08b0ba02befc2f6afef6dfa9ff0508a558854d64f24ac63dd7ac221cc9bf0bcafd3cfc6659e  it87-a82899557b4779b87d444a43caf126615e03bb4a.tar.gz
"
